package com.yyg.boot.interceptor;

import com.hazelcast.core.Message;
import com.hazelcast.core.MessageListener;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author 一一哥Sun
 * @Date Created in 2020/4/24
 * @Description 监听Topic的订阅消息
 */
@Slf4j
public class TopicListener implements MessageListener<String> {

    @Override
    public void onMessage(Message<String> message) {
        String msg=message.getMessageObject();
        log.warn("收到Topic消息："+msg);
    }

}
